using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace Blople.GameScenes
{
    public class HelpScene : GameScene
    {
        protected Texture2D backgroundTexture;
        protected Texture2D blockTexture;
        protected Texture2D arrowTexture;
        protected Texture2D spaceTexture;
        protected Texture2D pTexture;
        protected Texture2D escapeTexture;

        protected SpriteFont largeFont;
        protected SpriteFont smallFont;

        public HelpScene(Game game, Texture2D backgroundTexture, Texture2D blockTexture, Texture2D arrowTexture, Texture2D spaceTexture, Texture2D pTexture, Texture2D escapeTexture, SpriteFont largeFont, SpriteFont smallFont) : base(game)
        {
            this.backgroundTexture = backgroundTexture;
            this.blockTexture = blockTexture;
            this.arrowTexture = arrowTexture;
            this.spaceTexture = spaceTexture;
            this.pTexture = pTexture;
            this.escapeTexture = escapeTexture;
            this.largeFont = largeFont;
            this.smallFont = smallFont;
        }

        public override void Initialize()
        {
            base.Initialize();
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            SpriteBatch sBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
            sBatch.Draw(backgroundTexture, new Vector2(0, 0), Color.White);
            sBatch.Draw(blockTexture, new Vector2(25, 25), Color.White);
            sBatch.DrawString(largeFont, "Controls", new Vector2((Game.Window.ClientBounds.Width - largeFont.MeasureString("Controls").X) / 2, 50), Color.White);
            sBatch.Draw(arrowTexture, new Vector2(80, 151), new Rectangle(0, 0, 40, 40), Color.White, -1.55f, new Vector2(20, 20), 1.0f, SpriteEffects.None, 0.3f);
            sBatch.Draw(arrowTexture, new Vector2(120, 150), new Rectangle(0, 0, 40, 40), Color.White, 1.55f, new Vector2(20, 20), 1.0f, SpriteEffects.None, 0.3f);
            sBatch.DrawString(smallFont, "Use the left and right arrow", new Vector2(200, 130), Color.White);
            sBatch.DrawString(smallFont, "to aim.", new Vector2(200, 150), Color.White);
            sBatch.Draw(spaceTexture, new Vector2(100, 230), new Rectangle(0, 0, 80, 40), Color.White, 0f, new Vector2(40, 20), 1.0f, SpriteEffects.None, 0.3f);
            sBatch.DrawString(smallFont, "Use the space button to fire.", new Vector2(200, 220), Color.White);
            sBatch.Draw(pTexture, new Vector2(100, 290), new Rectangle(0, 0, 80, 40), Color.White, 0f, new Vector2(40, 20), 1.0f, SpriteEffects.None, 0.3f);
            sBatch.DrawString(smallFont, "Use the p button to pause.", new Vector2(200, 280), Color.White);
            sBatch.Draw(escapeTexture, new Vector2(100, 350), new Rectangle(0, 0, 80, 40), Color.White, 0f, new Vector2(40, 20), 1.0f, SpriteEffects.None, 0.3f);
            sBatch.DrawString(smallFont, "Use the escape button to ", new Vector2(200, 330), Color.White);
            sBatch.DrawString(smallFont, "go back to the menu.", new Vector2(200, 350), Color.White);
            sBatch.DrawString(largeFont, "About", new Vector2((Game.Window.ClientBounds.Width - largeFont.MeasureString("About").X)/2, 425), Color.White);
            sBatch.DrawString(smallFont, "Blople is a game based on Bubble. You", new Vector2(50, 500), Color.White);
            sBatch.DrawString(smallFont, "have to aim and shoot bubbles to make", new Vector2(50, 520), Color.White);
            sBatch.DrawString(smallFont, "them pop. Once they pop, you get a", new Vector2(50, 540), Color.White);
            sBatch.DrawString(smallFont, "higher score. The higher your score", new Vector2(50, 560), Color.White);
            sBatch.DrawString(smallFont, "is, the more likely you'll get high", new Vector2(50, 580), Color.White);
            sBatch.DrawString(smallFont, "in the high scores.", new Vector2(50, 600), Color.White);
            base.Draw(gameTime);
        }
    }
}
